A scene description language refers to any description language used to describe a scene to be rendered by a 3D renderer such as a ray tracer. The scene is written in a text editor (which may include syntax highlighting) as opposed to be modeled in a graphical way.
Some scene description language may include variables, constants, conditional statements, while loops and for loops.
3DMLW and X3D are XML-based scene description languages.
#declare the_angle = 0; #while (the_angle < 360) box { <-0.5, -0.5, -0.5> <0.5, 0.5, 0.5> texture { pigment { color Red } finish { specular 0.6 } normal { agate 0.25 scale 1/2 } } rotate the_angle } #declare the_angle = the_angle + 45; #end
<?xml version="1.0" standalone="no"?> <document> <content2d> <area width="200" height="100" color="#C0C0C0FF" texture="flower.png" /> </content2d> <content3d id="content" camera="{#cam}"> <camera id="cam" class="cam_rotation" y="10" z="40" viewy="10"/> <box name="ground" width="100" height="2" depth="100" color="green" class="ground" /> <box name="dynamic" y="20" width="10" height="10" depth="10" color="blue" /> </content3d> </document>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd"> <X3D profile="Interchange" version="3.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation=" http://www.web3d.org/specifications/x3d-3.2.xsd "> <Scene> <Shape> <IndexedFaceSet coordIndex="0 1 2"> <Coordinate point="0 0 0 1 0 0 0.5 1 0"/> </IndexedFaceSet> </Shape> </Scene> </X3D>